#pragma once
#include "RBTree.h"
using namespace std;

namespace exercise
{
	template<class K>
	class set
	{

		struct KeyOfT
		{
			K operator()(const K& key)
			{
				return key;
			}
		};

	public:		
		typedef typename RBTree<K, const K, KeyOfT>::Iterator iterator;
		typedef typename RBTree<K, const K, KeyOfT>::Const_Iterator const_iterator;

		pair<iterator, bool>  insert(const K& val)
		{
			return t.Insert(val);
		}

		iterator begin()
		{
			return t.begin();
		}

		iterator end()
		{
			return t.end();
		}

		const_iterator begin() const
		{
			return t.begin();
		}

		const_iterator end() const
		{
			return t.end();
		}

		iterator find(const K& k)
		{
			return t.Find(k);
		}

	private:
		RBTree<K, const K,KeyOfT> t;
	};
}
